import 'package:flutter/material.dart';

///颜色
class QuhuiColors {
  static const int primaryIntValue = 0xFFFFFFFF;

  static const MaterialColor primarySwatch = const MaterialColor(
    primaryIntValue,
    const <int, Color>{
      50: const Color(primaryIntValue),
      100: const Color(primaryIntValue),
      200: const Color(primaryIntValue),
      300: const Color(primaryIntValue),
      400: const Color(primaryIntValue),
      500: const Color(primaryIntValue),
      600: const Color(primaryIntValue),
      700: const Color(primaryIntValue),
      800: const Color(primaryIntValue),
      900: const Color(primaryIntValue),
    },
  );

//  static const String primaryValueString = "#24292E";
//  static const String primaryLightValueString = "#42464b";
//  static const String primaryDarkValueString = "#121917";
//  static const String miWhiteString = "#ececec";
//  static const String actionBlueString = "#267aff";
//  static const String webDraculaBackgroundColorString = "#282a36";

//  static const Color primaryValue = Color(0xFF24292E);
//  static const Color primaryLightValue = Color(0xFF42464b);
  static const Color primaryDarkValue = Color(0xe0000000);//黑色文字颜色

  static const Color cardWhite = Color(0xFFFFFFFF);
  static const Color textWhite = Color(0xFFFFFFFF);
  static const Color miWhite = Color(0xffececec);
  static const Color white = Color(0xFFFFFFFF);
  static const Color actionBlue = Color(0xff267aff);
  static const Color subTextColor = Color(0x8f000000);//灰色文字颜色
  static const Color grayColor = Color(0xffececec);
  static const Color subGrayColor = Color(0xff999999);
  static const Color minGrayColor = Color(0xffdedede);
  static const Color e9Color = Color(0xffe9e9e9);

  static const Color mainBackgroundColor = grayColor;

  static const Color mainTextColor = Color(0xff333333);
  static const Color textColorWhite = white;
  static const Color textColorRed = Color(0xffee0000);
  static const Color gray6Color = Color(0xff666666);

  static const mainThemeColor = Color(0xff128D61);
  static const dividerColor = Color(0xffcccccc);
  static const transparentColor = Color(0x90000000);

  static const List colors = [
    Color(0xffFFB6C1),
    Color(0xffFF69B4),
    Color(0xff8B008B),
    Color(0xff7B68EE),
    Color(0xff0000CD),
    Color(0xff00BFFF),
    Color(0xff5F9EA0),
    Color(0xff48D1CC),
    Color(0xff00FF7F),
    Color(0xff7CFC00),
    Color(0xffFFFF00),
    Color(0xffDAA520),
    Color(0xffFFA500),
    Color(0xffFF6347),
    Color(0xff8B0000),
    Color(0xffC0C0C0),
    Color(0xff000000),
  ];
}

///文本样式
class QuhuiConstant {

  static const double MARGIN_LEFT = 13.0;
  static const double MARGIN_RIGHT = 13.0;
  static const double TAB_BOTTOM = 8.0;
  
  static const String app_default_share_url =
      "https://github.com/CarGuo/QuhuiGithubAppFlutter";

  static const lagerTextSize = 30.0;
  static const bigTextSize = 20.0;
  static const normalTextSize = 18.0;
  static const middleTextSize = 16.0;
  static const smallTextSize = 14.0;
  static const minTextSize = 12.0;
  static const minMinTextSize = 9.0;

  static const minSubText = TextStyle(
    color: QuhuiColors.subTextColor,
    fontSize:minTextSize
  );


  static const minSubGray6Text = TextStyle(
      color: QuhuiColors.gray6Color,
      fontSize:minTextSize
  );
  static const minSubGrayText = TextStyle(
      color: QuhuiColors.subGrayColor,
      fontSize:minTextSize
  );
  static const minMinSubText = TextStyle(
      color: QuhuiColors.subTextColor,
      fontSize:minMinTextSize
  );
  static const minMinSubGray6Text = TextStyle(
      color: QuhuiColors.gray6Color,
      fontSize:minMinTextSize
  );
  static const minTextWhite = TextStyle(
    color: QuhuiColors.textColorWhite,
    fontSize: minTextSize
  );

  static const minText = TextStyle(
    color: QuhuiColors.mainTextColor,
    fontSize: minTextSize
  );


  static const minTextThemeColor = TextStyle(
      color: QuhuiColors.mainThemeColor,
      fontSize: minTextSize
  );

  static const smallTextBold = TextStyle(
    color: QuhuiColors.mainTextColor,
    fontSize: smallTextSize,
    fontWeight: FontWeight.bold,
  );

  static const smallText = TextStyle(
    color: QuhuiColors.mainTextColor,
    fontSize: smallTextSize,
  );

  static const smallTextThemeColor = TextStyle(
    color: QuhuiColors.mainThemeColor,
    fontSize: smallTextSize,
  );
  static const smallTextWhite = TextStyle(
    color: QuhuiColors.white,
    fontSize: smallTextSize,
  );

  static const smallSubText = TextStyle(
    color: QuhuiColors.subTextColor,
    fontSize: smallTextSize,
  );

  static const middleText = TextStyle(
    color: QuhuiColors.mainTextColor,
    fontSize: middleTextSize,
  );

  static const middleTextWhite = TextStyle(
    color: QuhuiColors.textColorWhite,
    fontSize: middleTextSize,
  );

  static const middleTextRedBold = TextStyle(
    color: QuhuiColors.textColorRed,
    fontSize: middleTextSize,
    fontWeight: FontWeight.bold,
  );
  static const smallTextRedBold = TextStyle(
    color: QuhuiColors.textColorRed,
    fontSize: smallTextSize,
  );
  static const middleSubText = TextStyle(
    color: QuhuiColors.subTextColor,
    fontSize: middleTextSize,
  );

  static const middleTextBold = TextStyle(
    color: QuhuiColors.mainTextColor,
    fontSize: middleTextSize,
    fontWeight: FontWeight.bold,
  );

  static const middleTextWhiteBold = TextStyle(
    color: QuhuiColors.textColorWhite,
    fontSize: middleTextSize,
    fontWeight: FontWeight.bold,
  );

  static const middleSubTextBold = TextStyle(
    color: QuhuiColors.subTextColor,
    fontSize: middleTextSize,
    fontWeight: FontWeight.bold,
  );

  static const normalText = TextStyle(
    color: QuhuiColors.mainTextColor,
    fontSize: normalTextSize,
  );

  static const normalTextBold = TextStyle(
    color: QuhuiColors.mainTextColor,
    fontSize: normalTextSize,
    fontWeight: FontWeight.bold,
  );

  static const normalSubText = TextStyle(
    color: QuhuiColors.subTextColor,
    fontSize: normalTextSize,
  );

  static const normalTextWhite = TextStyle(
    color: QuhuiColors.textColorWhite,
    fontSize: normalTextSize,
  );

  static const normalTextSubGray = TextStyle(
    color: QuhuiColors.subGrayColor,
    fontSize: normalTextSize,
  );

  static const largeText = TextStyle(
    color: QuhuiColors.mainTextColor,
    fontSize: bigTextSize,
  );

  static const largeTextBold = TextStyle(
    color: QuhuiColors.mainTextColor,
    fontSize: bigTextSize,
    fontWeight: FontWeight.bold,
  );

  static const largeTextWhite = TextStyle(
    color: QuhuiColors.textColorWhite,
    fontSize: bigTextSize,
  );

  static const largeTextWhiteBold = TextStyle(
    color: QuhuiColors.textColorWhite,
    fontSize: bigTextSize,
    fontWeight: FontWeight.bold,
  );

  static const largeLargeTextWhite = TextStyle(
    color: QuhuiColors.textColorWhite,
    fontSize: lagerTextSize,
    fontWeight: FontWeight.bold,
  );

}

class R{
  static const String DEFAULT_USER_ICON = 'assets/images/photo_default.png';
  static const String DEFAULT_IMAGE = 'assets/images/photo_default.png';

}

//Flutter中，可以像Web开发一样使用iconfont，iconfont即“字体图标”，它是将图标做成字体文件，然后通过指定不同的字符而显示不同的图片。
//在字体文件中，每一个字符都对应一个位码，而每一个位码对应一个显示字形，不同的字体就是指字形不同，即字符对应的字形是不同的。
// 而在iconfont中，只是将位码对应的字形做成了图标，所以不同的字符最终就会渲染成不同的图标。
//iconfont.cn上有很多字体图标素材，我们可以选择自己需要的图标打包下载后，会生成一些不同格式的字体文件，在Flutter中，我们使用ttf格式即可


class TabIconData {
  TabIconData({
    this.imagePath = '',
    this.index = 0,
    this.selectedImagePath = '',
    this.isSelected = false,
    this.animationController,
    this.name,
  });

  String imagePath;
  String selectedImagePath;
  bool isSelected;
  int index;
  String name;

  AnimationController animationController;

  static List<TabIconData> tabIconsList = <TabIconData>[
    TabIconData(
      imagePath: 'assets/images/faxian_nm.png',
      selectedImagePath: 'assets/images/faxian_press.png',
      index: 0,
      isSelected: true,
      animationController: null,
      name: "发现",
    ),
    TabIconData(
      imagePath: 'assets/images/xingqu_nm.png',
      selectedImagePath: 'assets/images/xingqu_press.png',
      index: 1,
      isSelected: false,
      animationController: null,
      name: "兴趣",
    ),
    TabIconData(
      imagePath: 'assets/images/huodong_nm.png',
      selectedImagePath: 'assets/images/huodong_press.png',
      index: 2,
      isSelected: false,
      animationController: null,
      name: "活动",
    ),
    TabIconData(
      imagePath: 'assets/images/wode_nm.png',
      selectedImagePath: 'assets/images/wode_press.png',
      index: 3,
      isSelected: false,
      animationController: null,
      name: "我的",
    ),
  ];
}
